import request from '@/utils/request'

// 查询兑换码列表
export function listExchangeCode(query) {
  return request({
    url: '/exchangeCode/exchangeCode/list',
    method: 'get',
    params: query
  })
}

// 查询兑换码详细
export function getExchangeCode(id) {
  return request({
    url: '/exchangeCode/exchangeCode/' + id,
    method: 'get'
  })
}

// 新增兑换码
export function addExchangeCode(data) {
  return request({
    url: '/exchangeCode/exchangeCode',
    method: 'post',
    data: data
  })
}

// 修改兑换码
export function updateExchangeCode(data) {
  return request({
    url: '/exchangeCode/exchangeCode',
    method: 'put',
    data: data
  })
}

// 删除兑换码
export function delExchangeCode(id) {
  return request({
    url: '/exchangeCode/exchangeCode/' + id,
    method: 'delete'
  })
}

// 新增兑换码
export function addExchangeCodeList(data) {
  return request({
    url: '/exchangeCode/exchangeCode/addLista',
    method: 'post',
    data: data
  })
}

